#ifndef MUSICMETADATA_H
#define MUSICMETADATA_H

#include "musicmetadata_global.h"
#include "precompiler.h"

class MUSICMETADATASHARED_EXPORT MusicMetaData {

public:
    // ergodic type
    enum ergodicFlags {
        Current,    // find current folder
        All         // find all folders
    };

    MusicMetaData();
    MusicMetaData(QString &filePath, ergodicFlags flag);

    // open the path which including audio files
    inline void Open(QString &filePath, ergodicFlags flag);

    // get a list about audios info
    QList<QMap<QString, QString> > GetAllBaseInfo();

private:
    // get audio base info
    QMap<QString, QString> GetBaseInfo(QFileInfo &fileInfo);

    // ergodic the audio in current folder
    void ErgodicCurrentFolder(QString &filePath);

    // ergodic the audio in all folders
    void ErgodicAllFolder(QString &filePath);

    QFileInfoList fileList;

};

#endif // MUSICMETADATA_H
